
-- 游戏启动将自动运行此文件
print("Hello, PC Editor Lua Script!")

local FrameLoader = require("Utils.FrameLoader")
local PrefabFactory = require("Utils.PrefabFactory")
local Consts = require("Data.Consts")
local UINodes = require("Data.UINodes")

--- main.lua
require "ClassUtils"
local MathUtils = require("Utils.MathUtils")
local enhancementData = require("Data.TableEnhancement")

G = {}
G.frameLoader = FrameLoader.new(10, 1) -- 分帧加载器
G.prefabFactory = PrefabFactory.new()
G.tickables = {G.frameLoader}
local GenerateController = require("GenerateController")
local region = LuaAPI.query_unit("通用触发区域1")
local startPoint = LuaAPI.query_unit("起点1")
local generateController = GenerateController.new() -- 英雄管理器

LuaAPI.global_register_trigger_event({ EVENT.ANY_LIFEENTITY_TRIGGER_SPACE
, Enums.TriggerSpaceEventType.ENTER, region.get_id() }, function (name, actor, data)
	-- print("life进入触发区域！")
end)
generateController:generateObjects(startPoint, 1073774615, 4, 4,nil)


-- LuaAPI.global_register_trigger_event({EVENT.ANY_LIFEENTITY_TRIGGER_SPACE, Enums.TriggerSpaceEventType.LEAVE,
--  region.get_id()}, function(event_name, actor, data)
-- 	print(data.event_unit)
-- 	print(data.event_unit_id)
-- 	print(data.trigger_event_type)
-- 	print(data.trigger_zone_id)
-- 	print(data.trigger_zone)
-- end)
-- LuaAPI.global_register_trigger_event({ EVENT.ANY_OBSTACLE_TRIGGER_SPACE, Enums.TriggerSpaceEventType.ENTER, region.get_id() }, function (name, actor, data)
-- 	print("进入触发区域！")
-- end)